package com.atguigu.patterns.singleton;



public class SingletonThreadNotSafe implements AbstractSingleton {
	private static SingletonThreadNotSafe instance;
	
	private SingletonThreadNotSafe() {}
	
	//提供一个静态的公有方法，当使用到该方法时，才去创建 instance
	//即懒汉式
	public static SingletonThreadNotSafe getInstance() {
		if(instance == null) {
			instance = new SingletonThreadNotSafe();
		}
		return instance;
	}
}
